Optimal. Leaf size=31 \[ \frac{\sec (x) \tanh ^{-1}(\sin (x))}{\sqrt{a \sec ^2(x)}}-\frac{\tan (x)}{\sqrt{a \sec ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0929046, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.294, Rules used = {3657, 4125, 2592, 321, 206} \[ \frac{\sec (x) \tanh ^{-1}(\sin (x))}{\sqrt{a \sec ^2(x)}}-\frac{\tan (x)}{\sqrt{a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3657
Rule 4125
Rule 2592
Rule 321
Rule 206
Rubi steps
\begin{align*} \int \frac{\tan ^2(x)}{\sqrt{a+a \tan ^2(x)}} \, dx &=\int \frac{\tan ^2(x)}{\sqrt{a \sec ^2(x)}} \, dx\\ &=\frac{\sec (x) \int \sin (x) \tan (x) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=\frac{\sec (x) \operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\sin (x)\right )}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{\tan (x)}{\sqrt{a \sec ^2(x)}}+\frac{\sec (x) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (x)\right )}{\sqrt{a \sec ^2(x)}}\\ &=\frac{\tanh ^{-1}(\sin (x)) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{\tan (x)}{\sqrt{a \sec ^2(x)}}\\ \end{align*}
Mathematica [A] time = 0.0373315, size = 49, normalized size = 1.58 \[ -\frac{\sec (x) \left (\sin (x)+\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )-\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )\right )}{\sqrt{a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.028, size = 38, normalized size = 1.2 \begin{align*}{\ln \left ( \sqrt{a}\tan \left ( x \right ) +\sqrt{a+a \left ( \tan \left ( x \right ) \right ) ^{2}} \right ){\frac{1}{\sqrt{a}}}}-{\tan \left ( x \right ){\frac{1}{\sqrt{a+a \left ( \tan \left ( x \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.8584, size = 57, normalized size = 1.84 \begin{align*} \frac{\log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right ) - 2 \, \sin \left (x\right )}{2 \, \sqrt{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.27321, size = 190, normalized size = 6.13 \begin{align*} \frac{{\left (\tan \left (x\right )^{2} + 1\right )} \sqrt{a} \log \left (2 \, a \tan \left (x\right )^{2} + 2 \, \sqrt{a \tan \left (x\right )^{2} + a} \sqrt{a} \tan \left (x\right ) + a\right ) - 2 \, \sqrt{a \tan \left (x\right )^{2} + a} \tan \left (x\right )}{2 \,{\left (a \tan \left (x\right )^{2} + a\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (x \right )}}{\sqrt{a \left (\tan ^{2}{\left (x \right )} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10569, size = 54, normalized size = 1.74 \begin{align*} -\frac{\log \left ({\left | -\sqrt{a} \tan \left (x\right ) + \sqrt{a \tan \left (x\right )^{2} + a} \right |}\right )}{\sqrt{a}} - \frac{\tan \left (x\right )}{\sqrt{a \tan \left (x\right )^{2} + a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]